import { request } from '../utils/index.js';
export default {
    setToken: (token) => (localStorage["u-t"] = token),
    getToken: () => localStorage["u-t"],
    usersLogin: ({ userName, userPassword }) => request({
        type: "post",
        url: "/api/users/login",
        data: { userName, userPassword }
    }),
    usersReg: ({ userName, userPassword }) => request({
        type: "post",
        url: "/api/users/reg",
        data: { userName, userPassword }
    }),
    checkName: ({ userName }) => request({
        type: "get",
        url: "/api/users/checkName",
        data: { userName }
    }),
    getList: ({ curPage = 1, eachPage = 5 }) => request({
        type: "get",
        url: "/api/users/getList",
        data: { curPage, eachPage }
    }),
}